import is from './IServiceProxy'
import iu from './IUserProxy'

is.url = iu.url = 'http://localhost:888/Action/';

iu.event = {
  onopen(req) {
    // todo: 登录后设置token
    req.setRequestHeader("AccessToken", localStorage.getItem('token'))
  },
  onerror(err) {
    alert(err.errMsg);
  }
}

export default {
  install(vue) {
    is.install(vue);
    iu.install(vue);
  }
}